{{template "admin/public/head.html" .}}
<section>
	<aside>
		{{template "admin/public/nav.html" .}}
	</aside>
	<article>
		<div class="top-title">
			<dl>
				<dt><h1>{{.title}}</h1></dt>
				<dd>&nbsp;</dd>
				<dd><a href="user_chat.html"><i class="iconfont">&#xe649;</i>帮助文档</a></dd>
			</dl>
		</div>

		<div class="content">
			<div class="release">
				<dl>
					<dt><i class="iconfont">&#xe649;</i> <b>{{.title}}说明</b><br>
						<p>会员都是通过微信登录获取到的信息<br>尽量不要<mark>编辑会员</mark>或者<mark>删除会员</mark></p>
					</dt>
					<!-- <dd><a href="/admin/member/add"><button type="button" class="button">添加会员</button></a></dd> -->
				</dl>
			</div>
			<form class="form">
				<table class="table1">
					<!-- 控制表格宽度  横向合并 colspan="1"  竖向合并 rowspan="3" -->
					<thead><th width="8%"></th><th width="17%"></th><th width="8%"></th><th width="17%"></th><th width="8%"></th><th width="17%"></th><th width="8%"></th><th width="17%"></th></thead>
					<tr>
						<td rowspan="3" colspan="2" class="center"><img src="{{if .info.pathname}}{{.info.pathname}}{{else}}/static/img/admin/avatar.jpg{{end}}" class="uppic img-3"><input type="file" onchange="uppic(this,'avatar')" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" class="file-3">
							<input type="hidden" name="avatar" value="{{.info.avatar}}"></td>
						<td class="genre">昵称</td>
						<td><input type="text" class="input95" placeholder="昵称" value="{{.info.monicker}}" name="monicker"></td>
						<td class="genre">名字</td>
						<td><input type="text" class="input95" placeholder="名字" value="{{.info.name}}" name="name"></td>
						<td class="genre">性别</td>
						<td>
							<label class="demo--label"><input class="demo--radio" type="radio" name="sex" value="0" {{if .info}}{{if eq .info.sex "0"}}checked{{end}}{{else}}checked{{end}}><span class="demo--radioInput"></span>保密</label>
							<label class="demo--label"><input class="demo--radio" type="radio" name="sex" value="1" {{if .info}}{{if eq .info.sex "1"}}checked{{end}}{{end}}><span class="demo--radioInput"></span>男</label>
							<label class="demo--label"><input class="demo--radio" type="radio" name="sex" value="2" {{if .info}}{{if eq .info.sex "2"}}checked{{end}}{{end}}><span class="demo--radioInput"></span>女</label>
						</td>
					</tr>
					<tr>
						<td class="genre">手机号码</td>
						<td><input type="text" class="input95" placeholder="手机号码" value="{{.info.mobile}}" readonly=""></td>
						<td class="genre">微信号</td>
						<td><input type="text" class="input95" placeholder="微信号" value="{{.info.wechat}}" name="wechat"></td>
						<td class="genre">邮箱</td>
						<td><input type="text" class="input95" placeholder="邮箱" value="{{.info.mail}}" name="mail"></td>
					</tr>
					<tr>
						<td class="genre">国家</td>
						<td>
							<input type="text" class="input95" placeholder="国家" value="{{.info.country}}" name="country">
						</td>
						<td class="genre">省</td>
						<td>
							<input type="text" class="input95" placeholder="省" value="{{.info.province}}" name="province">
						</td>
						<td class="genre">市</td>
						<td>
							<input type="text" class="input95" placeholder="市" value="{{.info.city}}" name="city">
						</td>
					</tr>
					<tr>
						<td class="genre">会员</td>
						<td colspan="3">
							<select name="vip" class="select95">
								<option value="0">普通会员</option>
								{{range .vip}}
								<option value ="{{.id}}" {{if $.vid}}{{if eq $.vid .id}}selected{{end}}{{end}}>{{.name}}</option>
								{{end}}
							</select>
						</td>
						<td class="genre">分销提成</td>
						<td colspan="3">
							<input type="number" class="input95" placeholder="分销提成" value="{{.info.distribution}}" name="distribution">
						</td>
					</tr>
					<tr>
						<td class="genre">详细地址</td>
						<td colspan="4">
							<input type="text" class="input95" placeholder="详细地址" value="{{.info.address}}" name="address">
						</td>
						{{if eq .admin.permission "1" "6"}}
						<td class="genre">余额</td>
						<td colspan="2">
							<input type="text" class="input95" placeholder="余额" value="{{.info.money}}" name="money">
						</td>
						{{end}}
					</tr>
				<input type="hidden" name="id" value="{{.info.id}}">
			</form>
				<tr class="trbutton">
						<td colspan="2"><button type="button" class="button">保存</button></td>
						<td colspan="6">
							<p>
								<i class="iconfont">&#xe649;</i> 请检查内容确认发布的内容没有涉及传播谣言、政治话题或违反广告法夸大宣传产品等。
							</p>
							<div class="help">帮助
								<div class="help_qr"><img src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/all/qr-code.jpg" alt=""></div>
							</div>
						</td>
					</tr>
			</table>
		</div>
	</article>
</section>

<footer><!-- 系统监控内容 --></footer>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/jquery.jedate.min.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/toast.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/uppic.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/xcConfirm.js"></script>
<script src="https://tcsc.oss-cn-hangzhou.aliyuncs.com/static/admin/js/app.js"></script>
<script>
	$('.button').click(function(){
		var form=$('form').serialize()
		$.ajax({
			url:window.location.href,
			data:form,
			type:'post',
			success:function(res){
				if(res==1){
					 window.wxc.xcConfirm("保存成功","success",{onClose:function(){
                        window.location.href = document.referrer
                    }})
				}else {
					 window.wxc.xcConfirm("保存失败,请重试!","error")
				}
			}
		})
	});
</script>
</body>
</html>
